package actions;

import gui.Frame;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

/**
 * Creates a new action to take the user to their home screen. 
 * 
 * @author Natalie
 *
 */
@SuppressWarnings("serial")
public class HomeAction extends AbstractAction {

	  private final Frame myFrame;

	  public HomeAction(final Frame theFrame) {  
	    super("Home");
	    myFrame = theFrame;
	    
	  }
	
	/**
	 * Takes the user to their home screen. 
	 */
	@Override
	public void actionPerformed(final ActionEvent theEvent) {
		myFrame.goHome();
	}

}
